package com.hzsk.lisence.mapper;

import com.hzsk.lisence.entity.EmProducePlanEntity;
import com.hzsk.lisence.entity.EmUkeyEntity;
import com.hzsk.lisence.entity.EmUkeyUseEntity;
import com.hzsk.lisence.entity.IDCEntity;
import com.hzsk.lisence.entity.query.IDCInfoQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface  IDCMapper {
    int add(IDCEntity idcEntity);

    IDCEntity selectIdcChipIdByIdcDeviceId (@Param("idcDeviceId") String idcDeviceId);

    IDCEntity selectIsIdcChipId (@Param("idcChipId") String idcChipId);

    IDCEntity selectIsWriteCommandAndIdcChipId (@Param("idcChipId") String idcChipId,@Param("writeCommand") String writeCommand);

    IDCEntity selectIsWrDeviceIdAndIdcChipId (@Param("idcChipId") String idcChipId,@Param("idcDeviceId") String idcDeviceId);

    Integer selectIDCByStatusAndPlanId(@Param("planId") String planId);

    List<IDCEntity> getIDCInfoByProducePlan(IDCInfoQuery idcInfoQuery);

    EmUkeyEntity checkEmUkey(@Param("emUID") String emUID,@Param("emUkey") String emUkey);

    Integer saveEmUkeyUseInfo(EmUkeyUseEntity emUkeyUseEntity);

    int updateIDCEntity(IDCEntity idcEntity);

    int updateIDCEntityStatus(IDCEntity idcEntity);

    int updateIDCEntityStatusByChipId(@Param("idcChipId") String idcChipId,@Param("status") String status);

    int delIDCEntityByChipId(@Param("idcChipId") String idcChipId);
    List<EmUkeyUseEntity>  getEmUkeyUseInfo(IDCInfoQuery idcInfoQuery);

    int updateEmUkeyUseStatus(@Param("idcChipId") String idcChipId,@Param("status") String status);


}
